/* 设置页面特定样式 */

/* 设置主内容区域 */
.settings-main {
    padding-top: 0;
    background-color: var(--secondary-bg);
}

/* 页面标题区域 */
.settings-header {
    background: linear-gradient(135deg, #2c3e50, #1a1a1a);
    padding: 40px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.settings-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23ffffff" stroke-opacity="0.05" stroke-width="1"/></svg>');
    opacity: 0.2;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.header-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
}

/* 设置容器 */
.settings-container {
    padding: 0 40px 40px;
    display: flex;
    gap: 30px;
}

/* 设置导航 */
.settings-nav {
    width: 200px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    padding: 15px 0;
}

.settings-nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.settings-nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.settings-nav-item.active {
    color: var(--highlight-color);
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--highlight-color);
}

.settings-nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* 设置内容区域 */
.settings-content {
    flex: 1;
    max-width: 800px;
}

.settings-section {
    display: none;
    animation: fadeIn 0.3s;
}

.settings-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.settings-group {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.setting-item {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    flex: 1;
    min-width: 200px;
    max-width: 60%;
}

.setting-label h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.setting-label p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.setting-control {
    display: flex;
    justify-content: flex-end;
    min-width: 140px;
}

/* 主题选择 */
.theme-options {
    display: flex;
    gap: 15px;
}

.theme-option {
    text-align: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.theme-option:hover {
    opacity: 0.9;
}

.theme-option.active {
    opacity: 1;
}

.theme-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 8px;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
    transition: all 0.2s;
}

.theme-option.active .theme-preview {
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 2px rgba(255, 55, 95, 0.3);
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 10px;
    border-radius: 5px;
}

.theme-preview::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dark-theme {
    background-color: #1a1a1a;
}

.dark-theme::before {
    background-color: #333;
}

.dark-theme::after {
    background-color: var(--highlight-color);
}

.light-theme {
    background-color: #f5f5f5;
}

.light-theme::before {
    background-color: #ddd;
}

.light-theme::after {
    background-color: var(--highlight-color);
}

.auto-theme {
    background: linear-gradient(135deg, #1a1a1a 50%, #f5f5f5 50%);
}

.auto-theme::before {
    background: linear-gradient(135deg, #333 50%, #ddd 50%);
}

.auto-theme::after {
    background-color: var(--highlight-color);
}

.theme-option span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.theme-option.active span {
    color: var(--text-primary);
}

/* 颜色选择 */
.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--color);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.color-option::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--color);
    opacity: 0;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active::after {
    opacity: 1;
}

/* 滑块 */
.range-slider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-track {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.range-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: var(--highlight-color);
    border-radius: 4px;
    width: 50%;
}

.range-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
}

.range-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.range-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 开关 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--highlight-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 下拉框 */
.select-box {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
    cursor: pointer;
}

.select-box:focus {
    outline: none;
    border-color: var(--highlight-color);
}

.select-box option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

/* 按钮组 */
.button-group {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.button-option {
    flex: 1;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.button-option:hover {
    color: var(--text-primary);
}

.button-option.active {
    background: var(--highlight-color);
    color: white;
}

/* 操作按钮 */
.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.action-btn.dangerous {
    color: #ff375f;
}

.action-btn.dangerous:hover {
    background-color: rgba(255, 55, 95, 0.15);
}

/* 存储使用情况 */
.storage-usage {
    width: 100%;
    padding-top: 10px;
}

.storage-bar {
    width: 100%;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    margin-bottom: 15px;
}

.storage-segment {
    height: 100%;
}

.storage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.storage-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.storage-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.storage-total {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 5px;
}

/* 关于信息 */
.about-info {
    width: 100%;
    text-align: center;
    padding: 20px 0;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--highlight-color), #ff8896);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-logo i {
    font-size: 40px;
    color: white;
}

.app-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.app-version {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.app-copyright {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.about-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--highlight-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 0;
    transition: opacity 0.2s;
}

.about-link:hover {
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .settings-header {
        padding: 30px;
    }
    
    .settings-container {
        padding: 0 20px 30px;
        flex-direction: column;
    }
    
    .settings-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .settings-nav-item {
        flex-direction: column;
        padding: 10px 15px;
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        text-align: center;
        gap: 5px;
    }
    
    .settings-nav-item.active {
        border-bottom-color: var(--highlight-color);
        border-left-color: transparent;
    }
    
    .settings-nav-item i {
        margin-right: 0;
    }
    
    .settings-content {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-label {
        max-width: 100%;
    }
    
    .setting-control {
        width: 100%;
    }
    
    .theme-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .storage-legend {
        flex-direction: column;
        gap: 8px;
    }
}

/* 触摸屏优化 */
@media (hover: none) {
    .range-handle {
        width: 24px;
        height: 24px;
    }
    
    .toggle-switch {
        width: 60px;
        height: 34px;
    }
    
    .toggle-slider:before {
        height: 26px;
        width: 26px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(26px);
    }
} 